package com.demo.config;

import org.springframework.ai.tool.annotation.Tool;

public class ToolEntity {
    @Tool(description = "加法运算")
    public static Integer addOperation(AddOperation addOperation){
        System.out.println("加法运算：" + addOperation.a + " + " + addOperation.b);
        return addOperation.a + addOperation.b;
    }

    public record AddOperation(Integer a, Integer b){}

    @Tool(description = "乘法运算")
    public static Integer mulOperation(MulOperation mulOperation){
        System.out.println("乘法运算：" + mulOperation.a + " * " + mulOperation.b);
        return mulOperation.a * mulOperation.b;
    }

    public record MulOperation(Integer a, Integer b){}
}
